import request from '../utils/request'

const urlprefix = ''

// export const getProductList = (params) => {
//   return request({
//     url: `/travel/products/list`,
//     method: 'get',
//     params
//   })
// }

export const getProductList = (params) => {
  return request({
    url: `/travel/products/list`,
    method: 'get',
    params  
  });
};

export const addNewProductApi = (sceneryForm) => {
  return request({
    url: `/travel/products/addTravelProduct`,
    method: 'post',
    data: sceneryForm
  })
}


export const queryProductByIdApi = (id) => {
  return request({
    url: `/travel/products/getTravelProductById/${id}`,
    method: 'get',
  })
}


export const delProductByIdApi = (id) => {
  return request({
    url: `/travel/products/deleteTravelProduct/${id}`,
    method: 'delete',
  })
}
export const updateProductApi = (sceneryForm) => {
  return request({
    url: `/travel/products/updateTravelProduct`,
    method: 'post',
    data: sceneryForm
  })
}
